package org.wattdepot.cli;

import static org.junit.Assert.assertEquals;
import org.junit.Test;
import org.wattdepot.resource.source.jaxb.Source;

/**
 * This program does behavioral tests to determine the server is outputting
 * the right information when I input a certain name.
 * @author wing
 *
 */
public class TestMethods {

  /**
   * Tests the searchSource method and makes sure it returns a known source. 
   * @throws Exception If problems occur. 
   */
  @Test
  public void testSourceSearch() throws Exception {
    CommandLineInterface cli = new CommandLineInterface();
    Source sources = cli.searchSource("SIM_KAHE");
    assertEquals("Checking sources", sources.getName(),"SIM_KAHE");
    sources = cli.searchSource("NOT_SOURCE");
    assertEquals("Checking sources", sources,null);
  }
  
  
}
